export default {
    plugins: [
        '~/plugins/request',
        '~/plugins/format'
    ],
    router: {
        linkActiveClass: 'active',
        // base: '/fed-e-task-03-03/',
        extendRoutes(routes, resolve) {
            // 清空默认路由
            routes.splice(0)
            routes.push(...[
                {
                    path: '/',
                    component: resolve(__dirname, 'pages/layouts/default.vue'),
                    children: [
                        {
                            name: 'home',
                            path: '',
                            component: resolve(__dirname, 'pages/home/index.vue')
                        },
                        {
                            name: 'login',
                            path: '/login',
                            component: resolve(__dirname, 'pages/login/index.vue')
                        },
                        {
                            name: 'register',
                            path: '/register',
                            component: resolve(__dirname, 'pages/login/index.vue')
                        },
                        {
                            name: 'profile',
                            path: '/profile/:username',
                            component: resolve(__dirname, 'pages/profile/index.vue')
                        },
                        {
                            name: 'settings',
                            path: '/settings',
                            component: resolve(__dirname, 'pages/settings/index.vue')
                        },
                        {
                            name: 'editor',
                            path: '/editor/:slug?',
                            component: resolve(__dirname, 'pages/editor/index.vue')
                        },
                        {
                            name: 'article',
                            path: '/article/:slug',
                            component: resolve(__dirname, 'pages/article/index.vue')
                        }
                    ]
                }

            ])
        }
    }
}